<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body {
            border: 1px black solid;
        }

        .box1 {
            width: 100px;
            height: 100px;
            background: black;
            float: right;
        }

        .box2 {
            width: 200px;
            height: 200px;
            background: green;
            float: right;
        }
    </style>
</head>
<body>
<div class="box1"></div>
<div class="box2"></div>
aaaaa
</body>
</html>